unit uPathSetingForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TPathSetingForm = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    btn1: TButton;
    btn2: TButton;
    btnFile: TSpeedButton;
    OpenDialog1: TOpenDialog;
    procedure FormCreate(Sender: TObject);
    procedure btnFileClick(Sender: TObject);
    procedure btn1Click(Sender: TObject);
    procedure btn2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  PathSetingForm: TPathSetingForm;

implementation

uses
  uGlobal;
{$R *.dfm}

procedure TPathSetingForm.FormCreate(Sender: TObject);
begin
  Edit1.Text := G_GLERPDB_File;
end;

procedure TPathSetingForm.btnFileClick(Sender: TObject);
begin
  if OpenDialog1.Execute then
    Edit1.Text := OpenDialog1.FileName;
end;

procedure TPathSetingForm.btn1Click(Sender: TObject);
begin
  G_GLERPDB_File := Edit1.Text;
  WorkPath := ExtractFilePath(G_GLERPDB_File);
  ModalResult := MrOk;
end;

procedure TPathSetingForm.btn2Click(Sender: TObject);
begin
  ModalResult := mrCancel;
end;

end.
